const fetch = require('../../utils/fetch.js')
Page({
  data: {
    slides:[],
    categories:[]
  },
  //事件处理函数
  
  onLoad: function (options) {
    fetch('slides').then(res =>{
      this.setData({ slides: res.data })
    }), 
      fetch('categories').then(res => {
      this.setData({ categories: res.data })
    })
  },
  
})
